<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: MapPlugin</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: MapPlugin</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>MapPlugin<span class="signature">(options)</span><span class="type-signature"></span></h2>
        
            <div class="class-description">地图插件，默认采用BingMap服务，可以设置其他地图服务或离线的地图服务,国内开发建议采用天地图。<br/>在线地图服务支持：BingMapsProvider，MapBoxProvider，TianDiTuMapsProvider，OpenStreetMapsProvider <br/>离线地图服务:XYZMapsProvider</div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    
    <h4 class="name" id="MapPlugin"><span class="type-signature"></span>new MapPlugin<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    构造函数
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">参数{     terrain:是否启用地形 默认false,注意如果默认开启地形，那么plugin.setDefaultCamera初始高度不能低于1000米     ui:是否需要Map UI控件 默认true     offlineTerrain:离线地形，数据为terrain-rgb瓦片，数据格式:{ baseUrl:'http://localhost:8888/my_terrain',minZoom:1,maxZoom:18}     terrainFast:是否启用地形加速 默认false，地形加速需要在开启地形的条件下进行地形快速绘制，但无法得到高程数据，如果地形只是作为背景，不需要获得地形高程信息，那么开启该功能可以提升性能}</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="addWater"><span class="type-signature"></span>addWater<span class="signature">(url)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    加载水面数据
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">一组包含经纬度的地理坐标点数据json</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="disposeGeoJson"><span class="type-signature"></span>disposeGeoJson<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    销毁所有的geojson资源
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="flyTo"><span class="type-signature"></span>flyTo<span class="signature">(param0, param1)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    相机动画飞行
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>param0</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            

            

            <td class="description last">{latitude, longitude,height,pitch=0,yaw=0}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>param1</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            

            

            <td class="description last">{duration = 3000,middleHeight = 300000,callback = null}</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="jumpBack"><span class="type-signature"></span>jumpBack<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    场景跳回地图
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="jumpTo"><span class="type-signature"></span>jumpTo<span class="signature">(modelId)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    场景跳转到模型
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>modelId</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="loadBIM"><span class="type-signature"></span>loadBIM<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    在地图中加载BIM模型,模型的中心点落在该经纬度上,返回Promise,该函数已废弃，建议采用viewer.load(url,options);
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">加载参数对象url 文件url地址modelId 模型id，确保唯一，默认使用时间戳latitude 纬度longitude 经度offset BIMI.THREE.Vector3 位置偏移向量 默认(0,0,0)scale BIMI.THREE.Vector3 缩放向量 默认(1,1,1)rotate BIMI.THREE.Vector3 旋转向量，xyz三轴的旋转角度 默认(0,0,0)</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="loadFBX"><span class="type-signature"></span>loadFBX<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    在地图中加载FBX模型,模型的中心点落在该经纬度上，返回Promise,该函数已废弃，建议采用viewer.load(url,options);
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">url 文件url地址modelId 模型id，确保唯一，默认使用时间戳latitude 纬度longitude 经度offset BIMI.THREE.Vector3 位置偏移向量 默认(0,0,0)scale BIMI.THREE.Vector3 缩放向量 默认(1,1,1)rotate BIMI.THREE.Vector3 旋转向量，xyz三轴的旋转角度 默认(0,0,0)</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="loadGeoJson"><span class="type-signature"></span>loadGeoJson<span class="signature">(url, options, callback)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    加载geojson
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">回调函数，参数包含geojson的THREE.Group对象</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="loadGLTF"><span class="type-signature"></span>loadGLTF<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    在地图中加载GLTF模型,模型的中心点落在该经纬度上，返回Promise,该函数已废弃，建议采用viewer.load(url,options);
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">url 文件url地址modelId 模型id，确保唯一，默认使用时间戳latitude 纬度longitude 经度offset BIMI.THREE.Vector3 位置偏移向量 默认(0,0,0)scale BIMI.THREE.Vector3 缩放向量 默认(1,1,1)rotate BIMI.THREE.Vector3 旋转向量，xyz三轴的旋转角度 默认(0,0,0)</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="loadIsoline"><span class="type-signature"></span>loadIsoline<span class="signature">(id, url, param, offsetHeight)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    加载等值线
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String/Number</span>


            
            </td>

            

            

            <td class="description last">等值线对象，可以通过id对等值线对象进行显示/隐藏/销毁等操作</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">xmap程序提供的等值线服务url，xmap是bimi引擎提供的针对GIS高级功能的后台服务程序。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>param</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">等值线参数对象。格式例如:let param = 
                {
                    //样本点
                    samples:[
                        {latitude:31.263594,longitude:120.843610,value:80},
                        {latitude:31.263594,longitude:120.943610,value:20},
                        {latitude:31.263594,longitude:121.043610,value:60},
                        {latitude:31.263594,longitude:121.143610,value:10},
                        {latitude:31.263594,longitude:121.243610,value:100},

                        {latitude:31.093232,longitude:120.843610,value:0},
                        {latitude:31.093232,longitude:120.943610,value:20},
                        {latitude:31.093232,longitude:121.043610,value:50},
                        {latitude:31.093232,longitude:121.143610,value:30},
                        {latitude:31.093232,longitude:121.243610,value:0},

                        {latitude:30.936382,longitude:120.843610,value:60},
                        {latitude:30.936382,longitude:120.943610,value:20},
                        {latitude:30.936382,longitude:121.043610,value:80},
                        {latitude:30.936382,longitude:121.143610,value:10},
                        {latitude:30.936382,longitude:121.243610,value:80},
                    ],
                    //范围，由左上角和右下角两点坐标组成
                    bounds:[30.836931,120.730107,31.344308,121.448660], 
                    //取值段落
                    legend:[5,30,50,70,90],
                    //每个取值段落的填充样式定义，注意，要包含小于最小的，和大于最大的两端定义
                    fillStyle:[ 
                        {color:'#ffffff',opacity:0.5}, //<5
                        {color:'#00c0ff',opacity:0.5}, //5-30
                        {color:'#0056ff',opacity:0.5}, //30-50
                        {color:'#ff884d',opacity:0.5}, //50-70
                        {color:'#ff4a00',opacity:0.5}, //70-90
                        {color:'#ff0000',opacity:0.5}  //>90
                    ],
                    //裁剪边界，是个geojson的polygon对象，通常为行政边界的geojson数据
                    clip:geojson
                }</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>offsetHeight</code></td>
            

            <td class="type">
            
                
<span class="param-type">Numher</span>


            
            </td>

            

            

            <td class="description last">等值线渲染的mesh对象离地面高度,注意负数表示高出地面，正数表示低于地面，默认值-1，表示离地1米的高度</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Promise
</div>



    





        
            

    

    
    <h4 class="name" id="loadOBJ"><span class="type-signature"></span>loadOBJ<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    在地图中加载OBJ模型,模型的中心点落在该经纬度上，返回Promise,该函数已废弃，建议采用viewer.load(url,options);
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">url 文件url地址modelId 模型id，确保唯一，默认使用时间戳latitude 纬度longitude 经度offset BIMI.THREE.Vector3 位置偏移向量 默认(0,0,0)scale BIMI.THREE.Vector3 缩放向量 默认(1,1,1)rotate BIMI.THREE.Vector3 旋转向量，xyz三轴的旋转角度 默认(0,0,0)</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="moveTo"><span class="type-signature"></span>moveTo<span class="signature">(param0)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    相机直接移动到指定位置
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>param0</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            

            

            <td class="description last">{latitude, longitude,height,pitch=0,yaw=0}</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    state数据对象
</div>



    





        
            

    

    
    <h4 class="name" id="removeGeoJson"><span class="type-signature"></span>removeGeoJson<span class="signature">(id)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    移除一个geojson对象
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="setDefaultCamera"><span class="type-signature"></span>setDefaultCamera<span class="signature">(param)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    设置相机初始位置
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>param</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            

            

            <td class="description last">位置参数{       latitude: 纬度 <br/>     longitude: 经度 <br/>     height: 高度(米) <br/>     pitch:相机俯仰角(绕X轴) ，默认-90，垂直向下     yaw:相机旋转角(绕Y轴)，默认0，对准北方}</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="setMapOpacity"><span class="type-signature"></span>setMapOpacity<span class="signature">(opacity)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    设置地图不透明度
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>opacity</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">不透明度，默认1.0</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="setModelPosition"><span class="type-signature"></span>setModelPosition<span class="signature">(modelId, latitude, longitude, offset, scale, rotate)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    设置模型在地图上的位置,该函数已废弃，建议采用viewer.setModelPosition(modelId,{
            latitude:latitude,
            longitude:longitude,
            offset:offset,
            scale:scale,
            rotate:rotate
        });
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>modelId</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>
|

<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">模型ID</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>latitude</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">纬度</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>longitude</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">经度</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>offset</code></td>
            

            <td class="type">
            
                
<span class="param-type">BIMI.THREE.Vector3</span>


            
            </td>

            

            

            <td class="description last">位置偏移量</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scale</code></td>
            

            <td class="type">
            
                
<span class="param-type">BIMI.THREE.Vector3</span>


            
            </td>

            

            

            <td class="description last">模型缩放量</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>rotate</code></td>
            

            <td class="type">
            
                
<span class="param-type">BIMI.THREE.Vector3</span>


            
            </td>

            

            

            <td class="description last">模型旋转量</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="showSky"><span class="type-signature"></span>showSky<span class="signature">(visible)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    显示天空盒
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>visible</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            

            

            <td class="description last">默认true</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="useBingMaps"><span class="type-signature"></span>useBingMaps<span class="signature">(apiToken, style)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    使用BingMaps地图
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>apiToken</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">bingmaps token</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>style</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">bingmaps地图样式 可选项 ： BingMapsProvider.AERIAL 卫星 默认值 BingMapsProvider.ROAD 矢量 BingMapsProvider.AERIAL_LABELS 卫星+拼音标记</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="useMapBox"><span class="type-signature"></span>useMapBox<span class="signature">(apiToken, style)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    使用MapBox地图
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>apiToken</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">mapbox token</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>style</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">mapbox地图style id可选项： - mapbox/streets-v10 矢量 - mapbox/outdoors-v10 矢量 - mapbox/light-v9 矢量 - mapbox/dark-v9 矢量，这个有名气啊 - mapbox/satellite-v9 卫星 默认值 - mapbox/satellite-streets-v10 卫星+路网 - mapbox/navigation-preview-day-v4 矢量 - mapbox/navigation-preview-night-v4 矢量 - mapbox/navigation-guidance-day-v4 矢量 - mapbox/navigation-guidance-night-v4 矢量</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="useOfflineMaps"><span class="type-signature"></span>useOfflineMaps<span class="signature">(baseUrl, minZoom, maxZoom, format)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    使用离线瓦片地图
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>baseUrl</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">地图服务基础URL，例如:'http://192.168.1.32:8888/offlineMaps'</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>minZoom</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">最小级别</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>maxZoom</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">最大级别</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">地图图片后缀名，默认 '.jpg'</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="useTDTMaps"><span class="type-signature"></span>useTDTMaps<span class="signature">(apiToken, style)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    使用天地图地图，天地图有调用限制，正式使用请自己申请企业版token
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>apiToken</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">天地图token</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>style</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">地图样式可选项 :  TianDiTuMapsProvider.SATELLITE  卫星  TianDiTuMapsProvider.ROAD  矢量</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="useTerrain"><span class="type-signature"></span>useTerrain<span class="signature">(use)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    切换地形
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>use</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">默认false</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="zoomToModel"><span class="type-signature"></span>zoomToModel<span class="signature">(modelId, fitOffset, fly, duration, middleHeight, callback)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    相机定位到某个模型
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>modelId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String/Number</span>


            
            </td>

            

            

            <td class="description last">模型ID</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fitOffset</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">聚焦距离指数，默认1.2</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fly</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">是否飞行动画 默认true</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>duration</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">飞行事件 默认3000</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>middleHeight</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">飞行高度 默认300000</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">飞行动画结束回调函数，默认null</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnnotationPlugin.html">AnnotationPlugin</a></li><li><a href="BillboardPlugin.html">BillboardPlugin</a></li><li><a href="BimViewer.html">BimViewer</a></li><li><a href="CircleWaveMeshPlugin.html">CircleWaveMeshPlugin</a></li><li><a href="CircleWavePlugin.html">CircleWavePlugin</a></li><li><a href="ClipBoxPlugin.html">ClipBoxPlugin</a></li><li><a href="ClipPlugin.html">ClipPlugin</a></li><li><a href="CommonTools.html">CommonTools</a></li><li><a href="CustomModel.html">CustomModel</a></li><li><a href="EdgePlugin.html">EdgePlugin</a></li><li><a href="ExplodePlugin.html">ExplodePlugin</a></li><li><a href="FencePlugin.html">FencePlugin</a></li><li><a href="FireClotPlugin.html">FireClotPlugin</a></li><li><a href="FirePlanPlugin.html">FirePlanPlugin</a></li><li><a href="FirePlugin.html">FirePlugin</a></li><li><a href="FlashPlugin.html">FlashPlugin</a></li><li><a href="FlyPlugin.html">FlyPlugin</a></li><li><a href="FpsPlugin.html">FpsPlugin</a></li><li><a href="GroundPlugin.html">GroundPlugin</a></li><li><a href="HeatmapCanvas.html">HeatmapCanvas</a></li><li><a href="HeatmapGridPlugin.html">HeatmapGridPlugin</a></li><li><a href="HeatmapPlugin.html">HeatmapPlugin</a></li><li><a href="HlsPlugin.html">HlsPlugin</a></li><li><a href="HtmlAnchorPlugin.html">HtmlAnchorPlugin</a></li><li><a href="HtmlDomPlugin.html">HtmlDomPlugin</a></li><li><a href="HtmlIconLabelPlugin.html">HtmlIconLabelPlugin</a></li><li><a href="HtmlLabelPlugin.html">HtmlLabelPlugin</a></li><li><a href="HtmlMarkerPlugin.html">HtmlMarkerPlugin</a></li><li><a href="ManPlugin.html">ManPlugin</a></li><li><a href="MapNode.html">MapNode</a></li><li><a href="MapPlugin.html">MapPlugin</a></li><li><a href="MapTools.html">MapTools</a></li><li><a href="MathHelp.html">MathHelp</a></li><li><a href="MeasurePlugin.html">MeasurePlugin</a></li><li><a href="module.exports_module.exports.html">exports</a></li><li><a href="MouseCapturePlugin.html">MouseCapturePlugin</a></li><li><a href="NavigationMapPlugin.html">NavigationMapPlugin</a></li><li><a href="OSGBPlugin.html">OSGBPlugin</a></li><li><a href="OutlinePlugin.html">OutlinePlugin</a></li><li><a href="PathRoamingPlugin.html">PathRoamingPlugin</a></li><li><a href="RainMaskPlugin.html">RainMaskPlugin</a></li><li><a href="RoadGeometryUtil.html">RoadGeometryUtil</a></li><li><a href="RoadPlugin.html">RoadPlugin</a></li><li><a href="RotatePlugin.html">RotatePlugin</a></li><li><a href="RotateScenePlugin.html">RotateScenePlugin</a></li><li><a href="SelectionBoxPlugin.html">SelectionBoxPlugin</a></li><li><a href="ShadowPlugin.html">ShadowPlugin</a></li><li><a href="SkyBoxPlugin.html">SkyBoxPlugin</a></li><li><a href="SmokePlugin.html">SmokePlugin</a></li><li><a href="SnowMaskPlugin.html">SnowMaskPlugin</a></li><li><a href="SpriteDomPlugin.html">SpriteDomPlugin</a></li><li><a href="SpriteLabelPlugin.html">SpriteLabelPlugin</a></li><li><a href="SpritePicturePlugin.html">SpritePicturePlugin</a></li><li><a href="SunPlugin.html">SunPlugin</a></li><li><a href="SvgCloudFrame.html">SvgCloudFrame</a></li><li><a href="SvgCloudLine.html">SvgCloudLine</a></li><li><a href="SvgEllipse.html">SvgEllipse</a></li><li><a href="SvgError.html">SvgError</a></li><li><a href="SvgLineArrow.html">SvgLineArrow</a></li><li><a href="SvgMultiplyLine.html">SvgMultiplyLine</a></li><li><a href="SvgRect.html">SvgRect</a></li><li><a href="SweepLightPlugin.html">SweepLightPlugin</a></li><li><a href="Tile.html">Tile</a></li><li><a href="Tip.html">Tip</a></li><li><a href="Toolbar.html">Toolbar</a></li><li><a href="TranslatePlugin.html">TranslatePlugin</a></li><li><a href="TubeFlowPlugin.html">TubeFlowPlugin</a></li><li><a href="TubeFlowWaterPlugin.html">TubeFlowWaterPlugin</a></li><li><a href="TweenTransparentPlugin.html">TweenTransparentPlugin</a></li><li><a href="UnrealBloomPlugin.html">UnrealBloomPlugin</a></li><li><a href="VideoPlugin.html">VideoPlugin</a></li><li><a href="ViewerEvent.html">ViewerEvent</a></li><li><a href="ViewerHelper.html">ViewerHelper</a></li><li><a href="Water.html">Water</a></li><li><a href="WaterPlugin.html">WaterPlugin</a></li></ul><h3>Global</h3><ul><li><a href="global.html#dispose">dispose</a></li><li><a href="global.html#setAction">setAction</a></li><li><a href="global.html#startAnimation">startAnimation</a></li><li><a href="global.html#stopAnimation">stopAnimation</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Tue Aug 29 2023 16:58:54 GMT+0800 (GMT+08:00)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>